"""
Version: 0.1
Author: CarpeDiem
Date: 2022/7/13
Description: 穷举法
"""
'''
for x in range(20):
    for y in range(33):
        z = (100 - 5 * x - 3 * y) * 3
        if x + y + z == 100:
            print(x, y, int(z / 3))

fish = 6
while True:
    total = fish
    enough = True
    for _ in range(4):
        if (total - 1) % 5 == 0:
            total = total - 1 - (total - 1) // 5
        else:
            enough = False
            break
    if enough:
        print(fish)
        break
    fish += 5
'''

fish = 6
while True:
    total = fish
    enough = True
    for i in range(5):
        if (total - 1) % 5 == 0:
            total = (total - 1) // 5 * 4
        else:
            enough = False
            break
    if enough:
        print(fish)
        break
    fish += 5